package com.sealer.pattern.structural.adapter.adapter;

import com.sealer.pattern.structural.adapter.adaptable.Adaptable;
import com.sealer.pattern.structural.adapter.adaptee.Adaptee;

/**
 * Created by sealer on 17/04/01.
 * 以组合方式实现的适配器------对象适配
 */
public class Adapter implements Adaptable {
    private Adaptee adaptee;

    @Override
    public void method1() {
        adaptee.method1();
    }

    @Override
    public void method2() {

    }

    public Adapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    public void setAdaptee(Adaptee adaptee) {
        this.adaptee = adaptee;
    }
}
